package lt.marsrutai.mobile.android.dao.dto;

import java.io.Serializable;
import java.util.List;

import lt.marsrutai.mobile.android.dao.annotation.DataField;

public class BusStopDto implements Serializable {

    private static final long serialVersionUID = -3444775814019203250L;

    private String id;
    private String trackId;
    private String name;
    private String fullName;
    private String directionName;

    private Float lat;
    private Float lng;

    private List<ScheduleDto> schedules;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTrackId() {
        return trackId;
    }

    public void setTrackId(String trackId) {
        this.trackId = trackId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDirectionName() {
        return directionName;
    }

    public void setDirectionName(String directionName) {
        this.directionName = directionName;
    }

    public Float getLat() {
        return lat;
    }

    public void setLat(Float lat) {
        this.lat = lat;
    }

    public Float getLng() {
        return lng;
    }

    public void setLng(Float lng) {
        this.lng = lng;
    }

    public List<ScheduleDto> getSchedules() {
        return schedules;
    }

    @DataField("SchedulesAtStop")
    public void setSchedules(List<ScheduleDto> schedules) {
        this.schedules = schedules;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    @Override
    public String toString() {
        return "BusStopDto [id=" + id + ", trackId=" + trackId + ", name=" + name + ", fullName=" + fullName + ", directionName="
                + directionName + ", lat=" + lat + ", lng=" + lng + ", schedules=" + schedules + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((directionName == null) ? 0 : directionName.hashCode());
        result = prime * result + ((fullName == null) ? 0 : fullName.hashCode());
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((lat == null) ? 0 : lat.hashCode());
        result = prime * result + ((lng == null) ? 0 : lng.hashCode());
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        result = prime * result + ((schedules == null) ? 0 : schedules.hashCode());
        result = prime * result + ((trackId == null) ? 0 : trackId.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        BusStopDto other = (BusStopDto) obj;
        if (directionName == null) {
            if (other.directionName != null)
                return false;
        }
        else if (!directionName.equals(other.directionName))
            return false;
        if (fullName == null) {
            if (other.fullName != null)
                return false;
        }
        else if (!fullName.equals(other.fullName))
            return false;
        if (id == null) {
            if (other.id != null)
                return false;
        }
        else if (!id.equals(other.id))
            return false;
        if (lat == null) {
            if (other.lat != null)
                return false;
        }
        else if (!lat.equals(other.lat))
            return false;
        if (lng == null) {
            if (other.lng != null)
                return false;
        }
        else if (!lng.equals(other.lng))
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        }
        else if (!name.equals(other.name))
            return false;
        if (schedules == null) {
            if (other.schedules != null)
                return false;
        }
        else if (!schedules.equals(other.schedules))
            return false;
        if (trackId == null) {
            if (other.trackId != null)
                return false;
        }
        else if (!trackId.equals(other.trackId))
            return false;
        return true;
    }

}
